<?php

namespace App\Tools;

class RegionPrice
{
    private static $data = array (
        'DK' =>
            array (
                'weekly_pro' => 1670,
                'golden_vip' => 8842,
            ),
        'UA' =>
            array (
                'weekly_pro' => 1578,
                'golden_vip' => 8434,
            ),
        'IL' =>
            array (
                'weekly_pro' => 1316,
                'golden_vip' => 6853,
            ),
        'IQ' =>
            array (
                'weekly_pro' => 1298,
                'golden_vip' => 6992,
            ),
        'RU' =>
            array (
                'weekly_pro' => 1252,
                'golden_vip' => 7017,
            ),
        'BG' =>
            array (
                'weekly_pro' => 1546,
                'golden_vip' => 8285,
            ),
        'HR' =>
            array (
                'weekly_pro' => 1621,
                'golden_vip' => 8652,
            ),
        'LI' =>
            array (
                'weekly_pro' => 1447,
                'golden_vip' => 7793,
            ),
        'CA' =>
            array (
                'weekly_pro' => 1331,
                'golden_vip' => 6951,
            ),
        'GH' =>
            array (
                'weekly_pro' => 1679,
                'golden_vip' => 8580,
            ),
        'HU' =>
            array (
                'weekly_pro' => 1643,
                'golden_vip' => 8937,
            ),
        'ZA' =>
            array (
                'weekly_pro' => 1522,
                'golden_vip' => 7998,
            ),
        'QA' =>
            array (
                'weekly_pro' => 1288,
                'golden_vip' => 6989,
            ),
        'LU' =>
            array (
                'weekly_pro' => 1511,
                'golden_vip' => 8100,
            ),
        'IN' =>
            array (
                'weekly_pro' => 1510,
                'golden_vip' => 8213,
            ),
        'ID' =>
            array (
                'weekly_pro' => 1335,
                'golden_vip' => 7312,
            ),
        'EC' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 6999,
            ),
        'TW' =>
            array (
                'weekly_pro' => 1369,
                'golden_vip' => 7365,
            ),
        'KZ' =>
            array (
                'weekly_pro' => 1458,
                'golden_vip' => 7858,
            ),
        'CO' =>
            array (
                'weekly_pro' => 1277,
                'golden_vip' => 6892,
            ),
        'CR' =>
            array (
                'weekly_pro' => 1311,
                'golden_vip' => 7058,
            ),
        'TR' =>
            array (
                'weekly_pro' => 1538,
                'golden_vip' => 8272,
            ),
        'SM' =>
            array (
                'weekly_pro' => 1286,
                'golden_vip' => 6973,
            ),
        'TZ' =>
            array (
                'weekly_pro' => 1311,
                'golden_vip' => 6977,
            ),
        'EG' =>
            array (
                'weekly_pro' => 1295,
                'golden_vip' => 6961,
            ),
        'RS' =>
            array (
                'weekly_pro' => 1563,
                'golden_vip' => 8280,
            ),
        'CY' =>
            array (
                'weekly_pro' => 1511,
                'golden_vip' => 8100,
            ),
        'MX' =>
            array (
                'weekly_pro' => 1492,
                'golden_vip' => 8156,
            ),
        'AT' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'BD' =>
            array (
                'weekly_pro' => 1317,
                'golden_vip' => 7054,
            ),
        'FM' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'NG' =>
            array (
                'weekly_pro' => 1410,
                'golden_vip' => 7605,
            ),
        'PK' =>
            array (
                'weekly_pro' => 1295,
                'golden_vip' => 7035,
            ),
        'PY' =>
            array (
                'weekly_pro' => 1243,
                'golden_vip' => 6906,
            ),
        'PA' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'BH' =>
            array (
                'weekly_pro' => 1399,
                'golden_vip' => 7500,
            ),
        'BR' =>
            array (
                'weekly_pro' => 1300,
                'golden_vip' => 7000,
            ),
        'GR' =>
            array (
                'weekly_pro' => 1623,
                'golden_vip' => 8663,
            ),
        'KY' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'DE' =>
            array (
                'weekly_pro' => 1515,
                'golden_vip' => 8123,
            ),
        'IT' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'LV' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'NO' =>
            array (
                'weekly_pro' => 1647,
                'golden_vip' => 8822,
            ),
        'CZ' =>
            array (
                'weekly_pro' => 1595,
                'golden_vip' => 8657,
            ),
        'MA' =>
            array (
                'weekly_pro' => 1567,
                'golden_vip' => 8325,
            ),
        'MC' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'SK' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'SI' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'LK' =>
            array (
                'weekly_pro' => 1248,
                'golden_vip' => 6974,
            ),
        'SG' =>
            array (
                'weekly_pro' => 1413,
                'golden_vip' => 7442,
            ),
        'NZ' =>
            array (
                'weekly_pro' => 1568,
                'golden_vip' => 8155,
            ),
        'JP' =>
            array (
                'weekly_pro' => 1320,
                'golden_vip' => 7037,
            ),
        'CL' =>
            array (
                'weekly_pro' => 1553,
                'golden_vip' => 8393,
            ),
        'KH' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7001,
            ),
        'GE' =>
            array (
                'weekly_pro' => 1538,
                'golden_vip' => 8831,
            ),
        'VA' =>
            array (
                'weekly_pro' => 1297,
                'golden_vip' => 7032,
            ),
        'BE' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'SA' =>
            array (
                'weekly_pro' => 1495,
                'golden_vip' => 8008,
            ),
        'FR' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'PL' =>
            array (
                'weekly_pro' => 1595,
                'golden_vip' => 8570,
            ),
        'TH' =>
            array (
                'weekly_pro' => 1382,
                'golden_vip' => 7494,
            ),
        'AU' =>
            array (
                'weekly_pro' => 1463,
                'golden_vip' => 7651,
            ),
        'MO' =>
            array (
                'weekly_pro' => 1341,
                'golden_vip' => 7051,
            ),
        'IE' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'EE' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'TC' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'BO' =>
            array (
                'weekly_pro' => 1314,
                'golden_vip' => 7082,
            ),
        'SE' =>
            array (
                'weekly_pro' => 1662,
                'golden_vip' => 8825,
            ),
        'CH' =>
            array (
                'weekly_pro' => 1337,
                'golden_vip' => 7245,
            ),
        'BM' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'GI' =>
            array (
                'weekly_pro' => 1307,
                'golden_vip' => 6974,
            ),
        'KW' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'PE' =>
            array (
                'weekly_pro' => 1303,
                'golden_vip' => 7060,
            ),
        'LT' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'JO' =>
            array (
                'weekly_pro' => 1296,
                'golden_vip' => 6993,
            ),
        'MM' =>
            array (
                'weekly_pro' => 1289,
                'golden_vip' => 6922,
            ),
        'RO' =>
            array (
                'weekly_pro' => 1522,
                'golden_vip' => 8374,
            ),
        'US' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'KE' =>
            array (
                'weekly_pro' => 1528,
                'golden_vip' => 8004,
            ),
        'FI' =>
            array (
                'weekly_pro' => 1623,
                'golden_vip' => 8663,
            ),
        'GB' =>
            array (
                'weekly_pro' => 1557,
                'golden_vip' => 8477,
            ),
        'VG' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'NL' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'PH' =>
            array (
                'weekly_pro' => 1306,
                'golden_vip' => 6985,
            ),
        'SV' =>
            array (
                'weekly_pro' => 1299,
                'golden_vip' => 7000,
            ),
        'PT' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'ES' =>
            array (
                'weekly_pro' => 1624,
                'golden_vip' => 8665,
            ),
        'VN' =>
            array (
                'weekly_pro' => 1300,
                'golden_vip' => 7034,
            ),
        'DZ' =>
            array (
                'weekly_pro' => 1304,
                'golden_vip' => 7017,
            ),
        'AE' =>
            array (
                'weekly_pro' => 1361,
                'golden_vip' => 7349,
            ),
        'OM' =>
            array (
                'weekly_pro' => 1399,
                'golden_vip' => 7500,
            ),
        'KR' =>
            array (
                'weekly_pro' => 1443,
                'golden_vip' => 7593,
            ),
        'HK' =>
            array (
                'weekly_pro' => 1278,
                'golden_vip' => 7011,
            ),
        'MY' =>
            array (
                'weekly_pro' => 1389,
                'golden_vip' => 7498,
            ),
    );

    /**
     * 获取价格
     * @param $region 地区
     * @param $pId 产品
     * @return void
     */
    public static function getPrice($region = "",$pId = "") {
        $region = strtoupper($region);
        if (array_key_exists($region,self::$data)) {
            $item = self::$data[$region];
            if (array_key_exists($pId,$item)) {
                return $item[$pId];
            }
        }
        return false;
    }

    /**
     * 根据地区获取周会员价格
     * @param $region
     * @return false|string|null
     */
    public static function getWeeklyPriceByRegion($region = "") {
        return self::getPrice($region,"weekly_pro");
    }

    /**
     * 根据地区获取周会员价格
     * @param $region
     * @return false|string|null
     */
    public static function getGoldenPriceByRegion($region = "") {
        return self::getPrice($region,"golden_vip");
    }
}